/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.grt192.mechanism.cannonbot;

import com.grt192.actuator.GRTTwoWaySolenoid;
import com.grt192.core.Command;
import com.grt192.core.Mechanism;

/**
 *
 * @author Robostudent
 */
public class Target extends Mechanism {
    private GRTTwoWaySolenoid solenoid;
    private boolean out = false;

    public Target(GRTTwoWaySolenoid solenoid){
        this.addActuator("solenoid", solenoid);
        this.solenoid = solenoid;
    }
    public void withdraw() {
         solenoid.enqueueCommand(new Command(GRTTwoWaySolenoid.REVERSE));
         out = false;
    }

    public void extend() {
         solenoid.enqueueCommand(new Command(GRTTwoWaySolenoid.FORWARD));
         out = true;
    }

    public boolean solenoidOut() {
        return out;
    }

}
